<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>layout 后台大布局 - Layui</title>
<link data-th-replace="commons :: res" >
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">layui 后台布局</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="http://t.cn/RCzsdCq" class="layui-nav-img"> [[${session.LOGIN_STATUS?.account}]]
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">基本资料</a>
						</dd>
						<dd>
							<a href="">安全设置</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a data-th-href="@{/logout}">注销</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<li data-th-each="res : ${session.LOGIN_STATUS.resources}" data-th-if="${res.typeId==session.RESOURCE_TYPE_MENU_ID and res.pid==-1}" class="layui-nav-item layui-nav-itemed">
						<a data-th-href="@{${#lists.isEmpty(res.childs)?res.url:'javascript:;'}}" data-th-text="${res.name}">权限管理</a>
						<dl data-th-unless="${#lists.isEmpty(res.childs)}" class="layui-nav-child">
							<dd data-th-each="r : ${res.childs}" data-th-if="${r.typeId==session.RESOURCE_TYPE_MENU_ID}">
								<a data-th-href="@{${r.url}}" data-th-text="${r.name}" target="main">用户管理</a>
							</dd>
						</dl>
					</li>
<!-- 					<li class="layui-nav-item layui-nav-itemed"> -->
<!-- 						<a href="javascript:;">权限管理</a> -->
<!-- 						<dl class="layui-nav-child"> -->
<!-- 							<dd> -->
<!-- 								<a data-th-href="@{/user}" target="main">用户管理</a> -->
<!-- 							</dd> -->
<!-- 							<dd> -->
<!-- 								<a data-th-href="@{/role}" target="main">角色管理</a> -->
<!-- 							</dd> -->
<!-- 							<dd> -->
<!-- 								<a data-th-href="@{/resource}" target="main">资源管理</a> -->
<!-- 							</dd> -->
<!-- 							<dd> -->
<!-- 								<a data-th-href="@{/resource-type}" target="main">资源类型管理</a> -->
<!-- 							</dd> -->
<!-- 						</dl> -->
<!-- 					</li> -->
				</ul>
			</div>
		</div>

		<div class="layui-body">
			<!-- 内容主体区域 -->
			<iframe name="main" width="100%" height="100%"></iframe>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© layui.com - 底部固定区域
		</div>
	</div>
	<script>
		//JavaScript代码区域
		layui.use('element', function() {
			var element = layui.element;

		});
	</script>
</body>
</html>